<!-- 维修评价详情弹窗 -->
<template>
  <a-form
    ref="form3"
    class="ele-form-detail"
    :model="feedbackModalApp.feedback"
    :label-col="{md: {span: 2}, sm: {span: 4}, xs: {span: 6}}"
    :wrapper-col="{md: {span: 22}, sm: {span: 20}, xs: {span: 18}}">
    <a-descriptions :title="feedbackModalApp.title" bordered>
<!--      <a-descriptions-item label="标识">-->
<!--        {{ feedbackModalApp.feedback.Eid }}-->
<!--      </a-descriptions-item>-->
<!--      <a-descriptions-item label="创建人">-->
<!--        {{ feedbackModalApp.feedback.creatorName }}-->
<!--      </a-descriptions-item>-->
<!--      <a-descriptions-item label="名称">-->
<!--        {{ feedbackModalApp.feedback.name }}-->
<!--      </a-descriptions-item>-->
      <a-descriptions-item label="反馈类型">
        {{ feedbackModalApp.feedback.feedBackType }}
      </a-descriptions-item>
      <a-descriptions-item label="内容">
        {{ feedbackModalApp.feedback.content }}
      </a-descriptions-item>
      <a-descriptions-item label="联系人">
        {{ feedbackModalApp.feedback.contacts }}
      </a-descriptions-item>
      <a-descriptions-item label="联系方式">
        {{ feedbackModalApp.feedback.contactMethod }}
      </a-descriptions-item>
<!--      <a-descriptions-item label="状态">-->
<!--        {{ feedbackModalApp.feedback.status }}-->
<!--      </a-descriptions-item>-->
<!--      <a-descriptions-item label="创建人ID">-->
<!--        {{ feedbackModalApp.feedback.creatorId }}-->
<!--      </a-descriptions-item>-->
      <a-descriptions-item label="备注">
        {{ feedbackModalApp.feedback.remark }}
      </a-descriptions-item>
      <a-descriptions-item label="创建时间">
        {{ feedbackModalApp.feedback.createDatetime }}
      </a-descriptions-item>
    </a-descriptions>
  </a-form>
</template>

<script>
import {defineComponent, reactive, onMounted, inject} from "vue";
import {useRoute} from "vue-router"
import {FeedbackService} from "@/views/repair/repairManagement/feedback/feedbackService";

export default defineComponent({
  setup() {
    const route = useRoute();
    let routeId = route.params.id;
    let feedbackListApp = inject('feedbackListApp', reactive({}));
    const feedbackModalApp = reactive({id: null, feedback: {}, display: false});

    onMounted(() => {
      feedbackModalApp.feedback = {};
      if (routeId) {
        feedbackModalApp.id = routeId;
      } else if (feedbackListApp.viewModalShowing) {
        feedbackModalApp.id = feedbackListApp.currentId;
        feedbackModalApp.display = true;
      }
      if (feedbackModalApp.id) {
        getInfo(feedbackModalApp.id);
      }
    })

    const getInfo = (id) => {
      FeedbackService.findFeedback(id).then((res) => {
        feedbackModalApp.feedback = res.data;
        feedbackModalApp.title = "查看 " + feedbackModalApp.feedback.name;
      })
    }

    return {
      feedbackModalApp,
      routeId,
      getInfo,
    }
  }
})
</script>

<style scoped>
</style>

